package com.juyu.miliao.api.domain;

import java.time.LocalDateTime;

import javax.validation.constraints.Min;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.juyu.miliao.api.validator.ComputeRedPacket;

/**
 * 幸运红包
 * 
 * @author wbf
 */
public class RedPacket {
	/** id */
	private int redPacketId;
	/** 用户id */
	@Min(value = 1, groups = {ComputeRedPacket.class})
	private long userId;
	/** 消费金币 */
	@Min(value = 1, groups = {ComputeRedPacket.class})
	private int inDeposit;
	/** 获得金币 */
	private int outDeposit;
	/** 收益 */
	private int difference;
	/** 创建时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private LocalDateTime createTime;
	/** 消费类型*/
	private int costType;

	public int getCostType() {
		return costType;
	}

	public void setCostType(int costType) {
		this.costType = costType;
	}

	public int getRedPacketId() {
		return redPacketId;
	}

	public void setRedPacketId(int redPacketId) {
		this.redPacketId = redPacketId;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public int getInDeposit() {
		return inDeposit;
	}

	public void setInDeposit(int inDeposit) {
		this.inDeposit = inDeposit;
	}

	public int getOutDeposit() {
		return outDeposit;
	}

	public void setOutDeposit(int outDeposit) {
		this.outDeposit = outDeposit;
	}

	public int getDifference() {
		return difference;
	}

	public void setDifference(int difference) {
		this.difference = difference;
	}

	public LocalDateTime getCreateTime() {
		return createTime;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}

}
